
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个性留言板</title>

<link href="css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript"> 
$(function(){
	
	// 移到留言上可以删除,编辑-------------------------------------------
		$('#mian .list .onep').hover(function() {
			$(this).find('a').show();
			$(this).find('.edit_a').show();
			$(this).find('.content').addClass('content1');
		}, function() {
			$(this).find('a').hide();
			$(this).find('.edit_a').hide();
			$(this).find('.content').removeClass('content1');
		});

   // 留言方式的切换------------------------------------------------
		var c=1;
		$('.close').click(function(event) {
			if(c==1){
				$('#right').stop().animate({"top": 800+'px'},2000).parent().parent().find('#bottom_out').stop().animate({"bottom": 0+'px'},3000);
				c=0;
			}else{
				$('#right').stop().animate({"top": 50+'px'},2000).parent().parent().find('#bottom_out').stop().animate({"bottom": -120+'px'},3000);
				c=1;
			}
		});

	
	
})


</script>

</head>

<body>
<div id="top">
    
</div>
<div id="mian_out">
    <div id="mian">
      <h2  align="center">员工信息表</h2>
      <form  action="" method="get">
          <span>快速查询：</span><input type="text" name="search" value="<?php echo $search;?>"/>
          <input type="submit" value="搜索" class="btn"/>
      </form>
      
                      
     <div id="yg">
          
         
         <table>
             <tr>
		<td style="width: 50px;">ID</td>
		<td style="width: 60px;">姓名</td>
		<td style="width: 80px;">头像</td>
		<td style="width: 95px;">所属部门</td>
                <td style="width: 180px;">出生日期</td>
		<td style="width: 180px;">入职时间</td>
		<td style="width: 100px;">相关操作</td>
	</tr>
            <?php
            foreach($bbsdata as $v)
            {
                ?>
	<tr>
		<td><?php echo $v['id']?></td>
		<td><?php echo $v['e_name']?></td>
                <td><img alt="" src="<?php echo $v['e_img']?>"></td>
		<td><?php echo $v['e_dept']?></td>
		<td><?php echo $v['date_of_birth']?></td>
		<td><?php echo $v['date_of_entry']?></td>
                <th><a class="edit_a" href="bbsupdate.php?id=<?php echo $v['id']?>">编辑</a> &nbsp;&nbsp;
                    <a class="delete" href="javascript:" onclick="if(confirm('确定删除吗？')) location.href='bbsdel.php?id=<?php echo $v['id']?>'" >删除</a></th>
	</tr>
                 <?php
            }
                 ?>
	</table>
	</div>
   <?php
       if ($page==1)
          $pre=1;
      else
          $pre=$page-1;
      if ($page==$maxpage)
          $next=$maxpage;
      else
          $next=$page+1;
    ?>
    <div id="page">
        <span >当前第<?php echo $page;?>页/共<?php echo $maxpage; ?>页</span>
        <a href="index.php?page=1&search=<?php echo $search;?>">首页</a>
          <a href="index.php?page=<?php echo $pre; ?>&search=<?php echo $search;?>">上一页</a>
          <a href="index.php?page=<?php echo $next; ?>&search=<?php echo $search;?>">下一页</a>
          <a href="index.php?page=<?php echo $maxpage; ?>&search=<?php echo $search;?>">尾页</a>
    </div>
     </div>


   
   <div id="right">
			<h2>添加员工信息</h2>
			<form action="bbsadd.php" method="post">
				<p class="one">
			姓名:<input class="name" name="e_name" type="text" placeholder="你的名字" />
                                </p>
                              
				
				<p class="tow">
					<input type="radio" name="e_img" value="images/1.jpg" checked="checked" /><img src=" images/1.jpg" alt="" />
					<input type="radio" name="e_img" value="images/2.jpg" /><img src=" images/2.jpg" alt="" />
					<input type="radio" name="e_img" value="images/3.jpg" /><img src=" images/3.jpg" alt="" />
					<input type="radio" name="e_img" value="images/4.jpg" /><img src=" images/4.jpg" alt="" />
				</p>
                            
                                    <p style="margin:10px auto;"> 所属部门:<input class="name" name="e_dept" type="text" placeholder="你的部门" /></p>
                                <p style="margin:10px auto;"> 出生日期:<input class="name" name="date_of_birth" type="text" placeholder="出生日期" /></p>
                                <p style="margin:10px auto;"> 入职时间:<input class="name" name="date_of_entry" type="text" placeholder="入职时间" /></p>
				<p class="thr"><input class="btn" type="submit" value="提交" /></p>
			</form>
			<div class="close"></div>
</div>
   
</div>

<div id="bottom_out">
		<div id="bottom">
			<form action="bbsadd.php" method="post">
				<p class="one">
				姓名:<input class="name" name="e_name" type="text" placeholder="大爷你的名字" />
				<br/><br/>
				</p>
				<p class="tow">
					<input type="radio" name="e_img" value="images/1.jpg" checked="checked" /><img src=" images/1.jpg" alt="" />
					<input type="radio" name="e_img" value="images/2.jpg" /><img src=" images/2.jpg" alt="" />
					<input type="radio" name="e_img" value="images/3.jpg" /><img src=" images/3.jpg" alt="" />
					<input type="radio" name="e_img" value="images/4.jpg" /><img src=" images/4.jpg" alt="" />
				</p>
                                <p style="margin:10px 10px;"> 所属部门:<input class="name" name="e_dept" type="text" placeholder="你的部门" /></p>
                                <p style="margin:10px 10px;"> 出生日期:<input class="name" name="date_of_birth" type="text" placeholder="出生日期" /></p>
                                <p style="margin:10px 10px;"> 入职时间:<input class="name" name="date_of_entry" type="text" placeholder="入职时间" /></p>
                                <p class="thr"><input class="btn" type="submit" value="提交" /></p>
			</form>
			<div class="close"></div>
		</div>
</div>

</body>
</html>
